/************************************************
 * Author       :   XXY
 * Blog         :   https://www.cnblogs.com/jzyl
 * Gitee        :   https://gitee.com/xiaobaichong
 * Email        :   1047185209@QQ.com
 * FileName     :   ScriptableObjectConfigBase.cs
 * CreateData   :   2023/5/25 13:50:18
 * UnityVersion :   2021.3.20f1c1
 * Description  :   ScriptableObject 配置基类
************************************************/

using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Security.AccessControl;
using UnityEngine;

#pragma warning disable CS0414
namespace Main
{
    /// <summary>
    /// ScriptableObject 配置基类
    /// </summary>
    public class ScriptableObjectConfigBase<T> : SerializedScriptableObject
    {
#if UNITY_EDITOR
        [Title("Head")]
        [ReadOnly, LabelWidth(150)]
        public Object ScriptableObject;
        [ReadOnly, LabelWidth(150)]
        public Object ScriptFile;
        [LabelWidth(150), Multiline, SerializeField]
        private string Description = "这是一个描述";
#endif
        [SerializeField] protected Dictionary<string, T> datas = new Dictionary<string, T>();
        public T this[string id]
        {
            get
            {
                return datas[id];
            }
        }
    }
}
